use strict;
use File::Copy qw(copy);
use Data::Dumper;

opendir my $dir, "epifreq" or die "Cannot open directory: $!";
my @files = readdir $dir;
closedir $dir;

#Create output file
open(OUTPUT,">epit_freqs.bat") || die "The file epit_freqs.bat could not be opened.\n"; #open file and handle unexpected errors


foreach my $f(@files)
	{
	my @temp = split(/_/,$f);
	print OUTPUT "perl epit_frequency.pl epifreq/$f\n";
	}
	
